// 学生服务类，处理学生相关的业务逻辑
public class StudentService {
    private StudentDAO studentDAO;

    public StudentService(StudentDAO studentDAO) {
        this.studentDAO = studentDAO;
    }

    public void saveStudent(Student student) {
        studentDAO.saveStudent(student);
    }

    public Student getStudentByName(String name) {
        return studentDAO.getStudentByName(name);
    }

    public void updateStudent(Student student) {
        studentDAO.updateStudent(student);
    }

    public void deleteStudent(Student student) {
        studentDAO.deleteStudent(student);
    }
}
